package com.scoring.system.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.scoring.system.mapper.RewardPunishmentMapper;
import com.scoring.system.pojo.RewardPunishment;
import com.scoring.system.service.RewardPunishmentService;
@Service("rewardPunishmentService")
public class RewardPunishmentServiceImpl implements RewardPunishmentService {
	
	@Resource
	private RewardPunishmentMapper rptDao;

	@Override
	public int softDelete(int id) {
		return rptDao.softDelete(id);
	}

	@Override
	public int saveRewardPunishment(RewardPunishment record) {
		return rptDao.insert(record);
	}

	@Override
	public RewardPunishment getRewardPunishmentById(int id) {
		return rptDao.selectByPrimaryKey(id);
	}

	@Override
	public List<RewardPunishment> listRewardPunishmentByStudentID(int studentId) {
		return rptDao.listRewardPunishmentByStudentId(studentId);
	}

	@Override
	public int updateRewardPunishment(RewardPunishment record) {
		return rptDao.updateByPrimaryKeySelective(record);
	}

}
